package com.zpark.mapper;

import com.zpark.pojo.Search;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author xiaoyu
 * @version 1.0 2022/11/19
 */
public interface ISearchMapper {
    // 检索词搜索
    List<Search> selectBySearchTerms(@Param("searchTerms") String searchTerms);
    // 查询数据条数
    Integer selectCount(@Param("searchTerms") String searchTerms);

    // 热点搜索
    List<Search> selectByBaidu(@Param("hotword") String hotword);
    List<Search> selectByReDian(@Param("hotword") String hotword);
    List<Search> selectByDouYin(@Param("hotword") String hotword);
    List<Search> selectByJava(@Param("hotword") String hotword);
    List<Search> selectByXiaoHua(@Param("hotword") String hotword);
    List<Search> selectByEngineer(@Param("hotword") String hotword);
    List<Search> selectByFood(@Param("hotword") String hotword);
    // 获取热点数据条数
    Integer selectBaiduCount();
    Integer selectReDianCount();
    Integer selectDouYinCount();
    Integer selectJavaCount();
    Integer selectXiaoHuaCount();
    Integer selectEngineerCount();
    Integer selectFoodCount();

    // 删除数据
    Integer deleteById(@Param("id") Integer id);
}
